Optimal. Leaf size=61 \[ \frac{(4 A+3 C) \sin (c+d x) \cos (c+d x)}{8 d}+\frac{1}{8} x (4 A+3 C)+\frac{C \sin (c+d x) \cos ^3(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0412907, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3014, 2635, 8} \[ \frac{(4 A+3 C) \sin (c+d x) \cos (c+d x)}{8 d}+\frac{1}{8} x (4 A+3 C)+\frac{C \sin (c+d x) \cos ^3(c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3014
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx &=\frac{C \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac{1}{4} (4 A+3 C) \int \cos ^2(c+d x) \, dx\\ &=\frac{(4 A+3 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac{C \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac{1}{8} (4 A+3 C) \int 1 \, dx\\ &=\frac{1}{8} (4 A+3 C) x+\frac{(4 A+3 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac{C \cos ^3(c+d x) \sin (c+d x)}{4 d}\\ \end{align*}
Mathematica [A] time = 0.0855863, size = 45, normalized size = 0.74 \[ \frac{4 (4 A+3 C) (c+d x)+8 (A+C) \sin (2 (c+d x))+C \sin (4 (c+d x))}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.037, size = 65, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( C \left ({\frac{\sin \left ( dx+c \right ) }{4} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) +A \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.68262, size = 99, normalized size = 1.62 \begin{align*} \frac{{\left (d x + c\right )}{\left (4 \, A + 3 \, C\right )} + \frac{{\left (4 \, A + 3 \, C\right )} \tan \left (d x + c\right )^{3} +{\left (4 \, A + 5 \, C\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.608, size = 119, normalized size = 1.95 \begin{align*} \frac{{\left (4 \, A + 3 \, C\right )} d x +{\left (2 \, C \cos \left (d x + c\right )^{3} +{\left (4 \, A + 3 \, C\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.72031, size = 158, normalized size = 2.59 \begin{align*} \begin{cases} \frac{A x \sin ^{2}{\left (c + d x \right )}}{2} + \frac{A x \cos ^{2}{\left (c + d x \right )}}{2} + \frac{A \sin{\left (c + d x \right )} \cos{\left (c + d x \right )}}{2 d} + \frac{3 C x \sin ^{4}{\left (c + d x \right )}}{8} + \frac{3 C x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac{3 C x \cos ^{4}{\left (c + d x \right )}}{8} + \frac{3 C \sin ^{3}{\left (c + d x \right )} \cos{\left (c + d x \right )}}{8 d} + \frac{5 C \sin{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} & \text{for}\: d \neq 0 \\x \left (A + C \cos ^{2}{\left (c \right )}\right ) \cos ^{2}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12214, size = 58, normalized size = 0.95 \begin{align*} \frac{1}{8} \,{\left (4 \, A + 3 \, C\right )} x + \frac{C \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac{{\left (A + C\right )} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]